package com.neo.pub.mapper;

import com.neo.common.annotation.DataSource;
import com.neo.common.enums.DataSourceType;
import com.neo.pub.domain.Patient;
import com.neo.pub.domain.QFPatient;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *  数据层
 * 
 * @author tr
 */
@DataSource(value = DataSourceType.HISBAK)
public interface QFPatientMapper
{

    public List<QFPatient> selectQFPatientList(String deptCode);

    public List<QFPatient> selectLastQFPatientList(String lastDeptCode);

    // select 科室编码 from table group by 科室编码
    public List<String> selectDeptCodeByGroup();
    //前次出院科室group
    public List<String> selectLastDeptCodeByGroup();

    //通过id分组
    public List<String> selectPatientGroupByIdNumber(String deptCode);

    public List<String> selectLastPatientGroupByIdNumber(String lastDeptCode);

    //通过科室编码和id查
    public List<QFPatient> selectPatientByDeptCodeAndIdNumber(@Param("deptCode") String deptCode, @Param("idNumber") String idNumber);

    public List<QFPatient> selectLastPatientByDeptCodeAndIdNumber(@Param("lastDeptCode")String lastDeptCode, @Param("idNumber")String idNumber);

    public String selectDeptNameByDeptCode(String deptCode);

    public String selectLastDeptNameByDeptCode(String lastDeptCode);
}
